/* Checks planet names */
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <stdbool.h>
#define NUM_PLAETS 9
bool my_strcmp(const char *s1, const char *s2);
int main(int argc, char *argv[])
{
    char *palnets[] = {"Mercury", "Venus", "Earth", 
                       "Mars", "Jupiter", "Saturn", 
                       "Uranus", "Neptune", "Pluto"};
    int i, j;
    for (i = 1; i < argc; i++) {
        for (j = 0; j < NUM_PLAETS; j++) {
            if (my_strcmp(argv[i], palnets[j])) {
                printf("%s is plannet %d\n", argv[i], j + 1);
                break;
            }
        }
        if (j == NUM_PLAETS)
            printf("%s is not a planet\n", argv[i]);
    }
    return 0;
}
bool my_strcmp(const char *s1, const char *s2) {
    const char *p1, *p2;
    for (p1 = s1, p2 = s2; *p1 && *p2; p1++, p2++) {
        if (toupper(*p1) != toupper(*p2))
            return false;
    }
    return (!*p1 && !*p2);
}